﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace AMOOF {
    class NavPanel : Panel {
        public bool Active { set; get; }
        public int Index { set; get; }
        public Control Control { set; get; }


        protected override void OnPaint(PaintEventArgs e) {
            base.OnPaint(e);
            //Text = "Optimize Models";
            //NavFont = new Font("Arial", 13, FontStyle.Bold);
            SizeF size = new SizeF();
            size = e.Graphics.MeasureString(Text, Font);
            float x = (this.Width - size.Width) / 2;
            float y = ((this.Height - size.Height) / 2) + 5;
            Brush b = this.Enabled ? Brushes.White : Brushes.Gray;

            e.Graphics.DrawString(Text, Font, b, x, y, StringFormat.GenericDefault);

        }

    }
}
